﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DFGK_WMS.Context.Migrations
{
    public partial class 修改职员表字段 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ContactInformation",
                table: "T_Employee");

            migrationBuilder.DropColumn(
                name: "DateBirth",
                table: "T_Employee");

            migrationBuilder.DropColumn(
                name: "EmploymentStatus",
                table: "T_Employee");

            migrationBuilder.DropColumn(
                name: "Gender",
                table: "T_Employee");

            migrationBuilder.RenameColumn(
                name: "Position",
                table: "T_Employee",
                newName: "EmployeeName");

            migrationBuilder.RenameColumn(
                name: "Name",
                table: "T_Employee",
                newName: "EmployeeCode");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "EmployeeName",
                table: "T_Employee",
                newName: "Position");

            migrationBuilder.RenameColumn(
                name: "EmployeeCode",
                table: "T_Employee",
                newName: "Name");

            migrationBuilder.AddColumn<string>(
                name: "ContactInformation",
                table: "T_Employee",
                type: "nvarchar(20)",
                maxLength: 20,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "DateBirth",
                table: "T_Employee",
                type: "nvarchar(20)",
                maxLength: 20,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "EmploymentStatus",
                table: "T_Employee",
                type: "nvarchar(20)",
                maxLength: 20,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Gender",
                table: "T_Employee",
                type: "nvarchar(20)",
                maxLength: 20,
                nullable: true);
        }
    }
}
